<template>
  <div>
    <ul>
      <li v-for="item in arr" :key="item">{{ item }}</li>
    </ul>
    <button @click="btn">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["帅哥", "美女", "程序员"],
    };
  },

  created() {},

  methods: {
    btn() {
      this.arr.push(this.arr[0]);
      console.log(this.arr[0]);
      this.arr.shift();
      // delete this.arr[0];
      // this.arr.splice(0, 1);
      // this.arr.length = this.arr.length - 2;
      // console.log(this.arr.length);
      // console.log(this.arr[5]);
      this.arr.remove(0);
    },
  },
};
</script>

<style scoped></style>
